﻿// =================================================================== 
// 项目说明
//====================================================================
// SunCity@Copy Right 2006-2008
// 文件： News.cs
// 项目名称：SunCity_MS 
// 创建时间：2015/3/18
// 负责人：Chris
// ===================================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using EMS20.Entity;
using EMS20.IDataAccessLayer;

namespace EMS20.DataAccessLayer
{
    /// <summary>
    /// 数据层实例化接口类  dbo.News.
    /// </summary>
    public partial class NewsDataAccessLayer : INewsDataAccessLayer
    {

        public DataTable GetNewsListByPage(int pageIndex, int pageSize, out int count)
        {
            string sqlStr = "USP_GetNewsByPage20";
            SqlParameter[] _param ={
				new SqlParameter("@pageIndex",SqlDbType.Int),
				new SqlParameter("@pageSize",SqlDbType.Int),
				new SqlParameter("@count",SqlDbType.Int),
				};
            _param[0].Value = pageIndex;
            _param[1].Value = pageSize;
            _param[2].Value = ParameterDirection.Output;

            DataTable dt = SqlHelper.ExecuteDataset(Conn.SqlConn, CommandType.StoredProcedure, sqlStr, _param).Tables[0];
            count = (int)_param[2].Value;

            return dt;

        }
    }
}
